package cn.jiyun.user.mapper;

import cn.jiyun.user.pojo.Users;
import org.apache.catalina.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface UserMapper {

//    @Insert("insert into user(nam,pwd,sex,birth) value(#{nam},#{pwd},#{sex},#{birth})")
    public void insertUser(Users users);

    @Select("select * from users")
    public List<Users>findAll();
@Select("select * from users where nam=#{username} and pwd=#{password} ")
    Users login(@Param("username") String username, @Param("password")String password);
@Delete("delete from users where id=#{id}")
    void delete(String id);

@Select("select *from users where id=#{id}")
    Users findbyid(String id);
   void updateUser(Users users);
}
